Added support for building against Protobuf 2.6#85
Open
stromnet wants to merge 1 commit intolinkedin:masterfrom
Open
Added support for building against Protobuf 2.6#85stromnet wants to merge 1 commit intolinkedin:masterfrom
stromnet wants to merge 1 commit intolinkedin:masterfrom
Conversation
Since ProtoUtils does some speedup-magic, special care had to be taken. The ByteString(byte[]) constructor is gone in 2.6. Instead a new LiteralByteString class exists. ProtoUtils will auto-detect if this exists, and use that approach instead. Note that the builder must manually rebuild the protocols in cluster/src/main/protobuf, since the generated files are NOT compatible!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds support for building with protobuf 2.6.1. For me, the main reason is that protobuf 2.5+ has OSGI headers, but other pro's with 2.6 exists. However, 2.4 and 2.6 are not proto-generated-code-compatible so I've made it optional to use 2.6.
Since ProtoUtils does some speedup-magic, special care had to be taken.
The ByteString(byte[]) constructor is gone in 2.6. Instead a new
LiteralByteString class exists.
ProtoUtils will auto-detect if this exists, and use that approach
instead.
Possible optimisation would be to ensure fastByteStringToByteArray is either a 2.4 or 2.6 implementation, rather than checking every time. Unfortunately I'm not fluent enough in scala, so I haven't quite figured out how to do that (if it is even possible)
Note that the builder must manually rebuild the protocols in
cluster/src/main/protobuf, since the generated files are NOT compatible!